var webpack = require('webpack');
module.exports = {
    entry: {
        'main':[
        'webpack-dev-server/client?http://127.0.0.1:5000', // WebpackDevServer host and port
        'webpack/hot/only-dev-server',
        './app/main.js'
        ] //演示单入口文件
    },
    output: {
        publicPath: "http://127.0.0.1:5000/build/",
        path: "./build/",
        filename: "bundle.js"
    },
    module: {
        loaders: [
            { test: /\.css$/, loader: "style!css" },
            { test: /\.jsx?$/, loader: "babel-loader",
                exclude: /node_modules/,
                query: {
                    presets: ['es2015','react']
                }
            },
            { test: /\.less$/, loader: "style!css!less" },
            { test: /\.(png|jpg)$/, loader: "url?limit=25000" }
        ]
    },
    plugins: [
        new webpack.DefinePlugin({
            'process.env.NODE.ENV':"development"
        }),
        new webpack.HotModuleReplacementPlugin()
    ]
};